<%@page contentType="text/html" pageEncoding="ISO-8859-1"%>
<%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
<%@taglib prefix="t" uri="http://myfaces.apache.org/tomahawk"%>
<%@taglib uri="http://richfaces.org/rich" prefix="rich"%>
<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>

<f:view>
    <link href="/general/css/admin_1.css" rel="stylesheet" type="text/css"/>
    <style type="text/css">
            .rich-message-marker img {
                padding-right:7px;
            }
            .rich-message-label {
                color:red;
            }
        </style>   
    <t:div>

        <h:form id="formulario" styleClass="fondoFormulariosyPanel">
            <h:panelGrid columns="1" styleClass="rayaForms" width="100%">
                <h:outputLabel value="Registrar Gastos Para Evento" />
            </h:panelGrid>
            <a4j:outputPanel ajaxRendered="true">
                <h:messages id="lblMessages" styleClass="messages" infoClass="infoClass" errorClass="errorClass"
                            warnClass="warnClass" showDetail="true" errorStyle="color:red;"
                            warnStyle="color:green;" infoStyle="color:black;" />
            </a4j:outputPanel>
            <h:panelGrid columns="3" styleClass="fondoFormulariosyPanel">

                <h:outputLabel value="Nombre" />
                <h:inputText id="txtNombre" value="#{DetalleConceptoController.detalleConcepto.dcoNombre}" size="50" maxlength="50" required="true" />
                <!--rich:message for="txtNombre" styleClass="messages" infoClass="infoClass2"
                              errorClass="errorClass2" warnClass="warnClass2" showDetail="true"/-->
                <rich:message for="chkActivo">
                    <f:facet name="passedMarker">
                        <h:graphicImage value="/img/exito.png" />
                    </f:facet>
                    <f:facet name="errorMarker">
                        <h:graphicImage value="/img/error.png" />
                    </f:facet>
                </rich:message>

                <h:outputLabel value="Tipo Concepto" />
                <h:selectOneMenu value="#{DetalleConceptoController.detalleConcepto.tpcCodigo}" onchange="limpiarMensaje();" >
                    <f:selectItems value="#{TipoConceptoController.comboTipoConcepto}" />
                </h:selectOneMenu>
                <h:outputLabel value="" />

                <h:outputLabel value="Activo" />
                <h:selectBooleanCheckbox id="chkActivo" value="#{DetalleConceptoController.detalleConcepto.dcoEstado}" required="true" onchange="limpiarMensaje();" />
                <rich:message for="chkActivo">
                    <f:facet name="passedMarker">
                        <h:graphicImage value="/img/exito.png" />
                    </f:facet>
                    <f:facet name="errorMarker">
                        <h:graphicImage value="/img/error.png" />
                    </f:facet>
                </rich:message>

            </h:panelGrid >
            <h:panelGrid columns="3">
                <h:commandButton id="btnRetornar" value="Retornar" accesskey="R" title="Retornar" immediate="true"
                                 action = "#{DetalleConceptoController.listar}" styleClass="desactivar" />
                <h:commandButton id="btnGuardar" value="Guardar" accesskey="G" title="Guardar"
                                 action="#{DetalleConceptoController.guardar}" styleClass="desactivar"
                                 onclick="return confirm('Deseas registrar el Detalle Concepto?');" />
                <h:commandButton id="btnCancelar" value="Cancelar" accesskey="A" title="Cancelar"
                                 action = "#{DetalleConceptoController.cancelar}" styleClass="desactivar" />
            </h:panelGrid>
            
        </h:form>
    </t:div>
</f:view>